﻿using System;
using System.Globalization;

namespace GeoAPI.CoordinateSystems
{
	[Serializable]
	public class AxisInfo
	{
		public AxisInfo(string name, AxisOrientationEnum orientation)
		{
			this._Name = name;
			this._Orientation = orientation;
		}

		public string Name
		{
			get
			{
				return this._Name;
			}
			set
			{
				this._Name = value;
			}
		}

		public AxisOrientationEnum Orientation
		{
			get
			{
				return this._Orientation;
			}
			set
			{
				this._Orientation = value;
			}
		}

		public string WKT
		{
			get
			{
				return string.Format("AXIS[\"{0}\", {1}]", this.Name, this.Orientation.ToString().ToUpper(CultureInfo.InvariantCulture));
			}
		}

		public string XML
		{
			get
			{
				return string.Format(CultureInfo.InvariantCulture.NumberFormat, "<CS_AxisInfo Name=\"{0}\" Orientation=\"{1}\"/>", new object[]
				{
					this.Name,
					this.Orientation.ToString().ToUpper(CultureInfo.InvariantCulture)
				});
			}
		}

		private string _Name;

		private AxisOrientationEnum _Orientation;
	}
}
